package com.nebula.common.util;

/**
 * Created by Mtime on 2017/9/1.
 */

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public abstract class TypeWrapper<T> {
    private final Type type;

    protected TypeWrapper() {
        Type superClass = this.getClass().getGenericSuperclass();
        this.type = ((ParameterizedType)superClass).getActualTypeArguments()[0];
    }

    public Type getType() {
        return this.type;
    }
}